<?php defined('SYSPATH') or die('No direct script access.'); ?>
<div id="section-body">
<div style="float:right">
    <ul class="uibutton-group">
        <li><a class="uibutton icon answer normal" title="Novo Usuário" href="<?php echo Kohana::$base_url; ?>manager/user">voltar</a></li>
    </ul>
</div>
<div class=" clear"></div>
<div class="onecolumn" >
    <div class="header"><span><span class="ico gray user"></span>Usuários - Dados de perfil</span></div>
    <div class="clear"></div>
    <div class="content" >
        
            <form id="data-form" action="<?php echo Kohana::$base_url; ?>manager/user/save" method="POST"> 
                <div class="grid3">
                   
                    <div class="section ">
                        <label>Nome completo<small>Nome que você será chamado.</small></label>   
                        <div> 
                            <input type="text" class="validate[required] large" name="fullname" id="fullname" value="<?php echo $model->fullname; ?>">
                        </div>
                    </div>
                    <div class="section">
                        <label>E-mail</label>
                        <div> 
                            <input type="text" class="validate[required,custom[email]]  large" name="email" id="email" value="<?php echo $model->email; ?>">
                            <span class="f_help"> Preencha com um e-mail válido.</span> 
                        </div>                        
                    </div>
                    <div class="section">
                        <label>Senha</label>
                        <div>
                            <?php if($user_id){ ?>
                                <input type="password" placeholder="Password" class="medium"  name="password" id="password"  />
                                <span class="f_help">Escolha uma senha com mais de 4 digitos.</span>
                            <?php }else{ ?>                                
                                <input type="password" placeholder="Password" class="validate[required,minSize[4]] medium"  name="password" id="password"  />
                                <span class="f_help">Escolha uma senha com mais de 4 digitos.</span>
                            <?php } ?>
                        </div>
                    </div>
                    <div class="section last">
                        <div>
                            <a class="uibutton submit_form" id="bt-save-data">Salvar</a>
                            <a class="uibutton special" id="bt-cancel" href="<?php echo Kohana::$base_url; ?>/manager/user">Cancelar</a>
                        </div>
                    </div>
                </div>

                <input type="hidden" name="id" value="<?php echo $model->id; ?>">
            </form>
            <div class="clear"></div>
        </div>
    </div>
</div>
